//
//  CarDetailsViewController.m
//  UcarTest
//
//  Created by 陈曦 on 16/1/14.
//  Copyright © 2016年 chenxi. All rights reserved.
//

#import "MSSAutoresizeLabelFlowCell1.h"
#import "MSSAutoresizeLabelFlowConfig1.h"

@interface MSSAutoresizeLabelFlowCell1 ()

@property (nonatomic,strong) UILabel *titleLabel;

@end

@implementation MSSAutoresizeLabelFlowCell1

- (UILabel *)titleLabel {
    if (_titleLabel == nil) {
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.backgroundColor = [UIColor orangeColor];
        _titleLabel.textColor = [UIColor whiteColor];
        _titleLabel.font = [MSSAutoresizeLabelFlowConfig1 shareConfig].textFont;
        _titleLabel.layer.cornerRadius = [MSSAutoresizeLabelFlowConfig1 shareConfig].itemCornerRaius;
        _titleLabel.layer.borderColor = [UIColor clearColor].CGColor;
        _titleLabel.layer.borderWidth = 0.5;
        _titleLabel.layer.masksToBounds = YES;
        _titleLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _titleLabel;
}

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self.contentView addSubview:self.titleLabel];
    }
    return self;
}

- (void)configCellWithTitle:(NSString *)title {
    self.titleLabel.frame = self.bounds;
    self.titleLabel.text = title;
}

@end
